package com.itheima.job1;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class Test {
        public static void main(String[] args){
           Scanner sc = new Scanner(System.in);
            String next = sc.nextLine();
            try {
                show(next);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        public static void show(String filePath) throws IOException {
            //如果文件不存在创建文件
            File file = new File(filePath);
            if (!file.exists()){
                file.createNewFile();
            }
            System.out.println("文件名："+file.getName()+",绝对路径名："+file.getAbsolutePath()+",父目录："+file.getParent()+"，文件大小："+file.length()+"byte" +"后缀名:"+file.getName().split("\\.")[1]);
        }

}
